// 引入依赖的配置文件模块
require(["config"], function(){
	// 引入依赖模块
	require(["jquery", "header", "carousel"], function($){
		function Index() {
			this.loadCarousel();
			this.addListener();
		}

		$.extend(Index.prototype, {
			// 加载轮播图
			loadCarousel: function() {
				$(".carousel-box").carousel({
					imgs : [
						{href:"#", src:"/images/pc2018071018212613783.jpg"},
						{href:"#", src:"/images/pc2018070516360633316.jpg"}
					],
					width: 1920,
					height: 680,
					duration: 5000
				});
			},
			addListener: function(){
				$(".qrcode_point").on("click",this.deleteAd);
			},
			deleteAd: function(){
				$(".qrcode").fadeOut();
			}
		});

		new Index();
	});
});
